import React, { Component } from 'react';
import { NavBar,Toast} from 'antd-mobile'
import { withRouter } from 'react-router-dom';
class Header extends Component {
    constructor(props){
        super(props)
        this.state={

        }
    }
    back(){
        console.log(this);
        Toast.show({
            content: '点击了返回区域',
            duration: 1000,
          })
          this.props.history.goBack()
     }
    render() {
        return (
            <div className='header' >
                 <div className="top">
                    <NavBar onBack={()=>{this.back()}}>注册</NavBar>
                </div>
            </div>
        );
    }
}

export default withRouter(Header);